  # conding:utf-8
from nose.plugins import Plugin
from nose import run
from htmloutput.htmloutput import HtmlOutput
import os,time

path = 'C:\\Users\\feng\Desktop\python01\\fengfan_src\\test_fengfan'
outfile = os.path.join(path, 'test_fengcase.py')  #获取执行文件地址，这样写比较有逼格
curTime = time.strftime('%Y%m%d%H%M%S', time.localtime())
run(argv=['nosetests', '-v', '--with-html-output','--html-out-file=C:\\Users\\feng\Desktop\python01\\fengfan_src\\results\\'+curTime+'.html', outfile],plugins=[HtmlOutput()])

# '--with-html-output' :启用插件HtlmOutput：输出结果为html
#'--html-out-file=C:\\Users\\feng\Desktop\python01\\fengfan_src\\results\\response.html' ：导出文件地址
#outfile  执行文件地址
#plugins ——插件     plugins=[HtmlOutput()]应该是指在那里执行！第三方库记住就好
